package edu.ccut.saturn.studio.dialog.webcontextdialog;

import org.eclipse.jface.viewers.ILabelProviderListener;
import org.eclipse.jface.viewers.ITableLabelProvider;
import org.eclipse.swt.graphics.Image;

import edu.ccut.saturn.studio.logic.model.saturn.SaturnWebContextParameter;

public class WebContextLabelProvider implements ITableLabelProvider {

	public Image getColumnImage(Object arg0, int arg1) {
		return null;
	}

	public String getColumnText(Object element, int columnIndex) {
		SaturnWebContextParameter o = (SaturnWebContextParameter)element;
		if (columnIndex == 0) {
			return o.getId();
		}
		if (columnIndex == 1) {
			return o.getKey();
		}
		if (columnIndex == 2) {
			return o.getScope();
		}
		if (columnIndex == 3) {
			return o.getNewKey();
		}
		if (columnIndex == 4) {
			return o.getNewScope();
		}
		
		return ""; 
	}

	public void addListener(ILabelProviderListener arg0) {
	}

	public void dispose() {
	}

	public boolean isLabelProperty(Object arg0, String arg1) {
		return false;
	}

	public void removeListener(ILabelProviderListener arg0) {
	}
}